#include <iostream>
#include <cmath>
using namespace std;
class circular
{
public:
    //设置圆的半径--有参构造函数
    circular(double r)
    {
        p_r=r;
    }
    //判断点和圆的关系
    void judge(double d){
        if(p_r>d){
           cout<<"点在圆内"<<endl; 
        }
        else if(p_r==d){
            cout<<"点在圆上"<<endl;
        }
        else{
            cout<<"点在圆外"<<endl;
        }
    }
    ~circular()//析构函数
    {

    }
private:
    //圆的半径
    double p_r;
};
class spot
{
public:
    //设置点的坐标--有参构造函数
    spot(double x,double y){
        p_x=x;
        p_y=y;
    }
    //获取点到圆心的距离
    double push_distance(){
        double d;
        d=sqrt((p_x*p_x)+(p_y*p_y));
        return d;
    }
    ~spot()//析构函数
    {

    }
private:
    double p_x,p_y;
};
int main()
{
    spot d(3,4);//创建一个点对象
    circular y(6);//创建一个圆对象
    y.judge(d.push_distance());
    return 0;
}